2
Laboratorio 4: Ottimizzazione della Ricerca Avversariale
PolyU COMP55112026-02-2

Euristica 1: Strategia Posizionale

A standard Minimax AI only knows it has won when it forms 5-in-a-row. Until that very last moment, every spot on the board often looks "equal" (score 0), causing it to move randomly in the early game.

Il Concetto

  • Non tutte le posizioni vuote sono uguali. A stone played in the corner is weak; it has fewer directions to expand.
  • Un pezzo nel centro is powerful. It controls vertical, horizontal, and diagonal lines simultaneously.
  • Obiettivo: Encourage the AI to control the center even before it sees a winning line.

L'Implementazione: "Mappe di Calore"

Instead of calculating "centrality" geometry in real-time (which is slow), we pre-define a tabella di ricerca.

This is a 2D matrix matching the board size. Higher numbers indicate more valuable strategic positions. When evaluate_board runs, we simply look up the value for every stone the AI has placed.